package com.cbgolf.oa.presenter;

import com.cbgolf.oa.contract.IMainContract;
import com.cbgolf.oa.contract.IMainContract.IMainModel;
import com.cbgolf.oa.contract.IMainContract.IMainView;
import com.cbgolf.oa.model.MainModelImp;

public class MainPresenterImp implements IMainContract.IMainPresenter {

  private IMainView view;
  private IMainModel model;

  public MainPresenterImp(IMainView view) {
    this.view = view;
    model = new MainModelImp();
  }

  @Override
  public void refreshAll(boolean isOnce) {
    if (isOnce) {
      view.showProgress();
    }
    model.refreshUserInfo();
    model.requestMenus(isOnce);
    model.requestMsgNoRead();
    model.requestFirWayLatlon();

  }

  @Override
  public void confirmOrder(String orderId, String orderCode) {
    view.showProgress();
    model.confirmOrder(orderId, orderCode);
  }
}
